Integrand size = 17, antiderivative size = 45 \[ \int \frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\log (x)-\frac {\tan \left (a+b \log \left (c x^n\right )\right )}{b n}+\frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n} \]
Time = 0.08 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.38 \[ \int \frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {\arctan \left (\tan \left (a+b \log \left (c x^n\right )\right )\right )}{b n}-\frac {\tan \left (a+b \log \left (c x^n\right )\right )}{b n}+\frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n} \]
ArcTan[Tan[a + b*Log[c*x^n]]]/(b*n) - Tan[a + b*Log[c*x^n]]/(b*n) + Tan[a + b*Log[c*x^n]]^3/(3*b*n)
Time = 0.28 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.04, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {3039, 3042, 3954, 3042, 3954, 24}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx\) |
\(\Big \downarrow \) 3039 |
\(\displaystyle \frac {\int \tan ^4\left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )}{n}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \tan \left (a+b \log \left (c x^n\right )\right )^4d\log \left (c x^n\right )}{n}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle \frac {\frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{3 b}-\int \tan ^2\left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )}{n}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{3 b}-\int \tan \left (a+b \log \left (c x^n\right )\right )^2d\log \left (c x^n\right )}{n}\) |
\(\Big \downarrow \) 3954 |
\(\displaystyle \frac {\int 1d\log \left (c x^n\right )+\frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{3 b}-\frac {\tan \left (a+b \log \left (c x^n\right )\right )}{b}}{n}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {\tan ^3\left (a+b \log \left (c x^n\right )\right )}{3 b}-\frac {\tan \left (a+b \log \left (c x^n\right )\right )}{b}+\log \left (c x^n\right )}{n}\) |
3.2.73.3.1 Defintions of rubi rules used
Int[u_, x_Symbol] :> With[{lst = FunctionOfLog[Cancel[x*u], x]}, Simp[1/lst [[3]] Subst[Int[lst[[1]], x], x, Log[lst[[2]]]], x] /; !FalseQ[lst]] /; NonsumQ[u]
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d *x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2 Int[(b*Tan[c + d*x])^(n - 2), x] , x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
Time = 0.42 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.98
method | result | size |
parallelrisch | \(-\frac {-3 \ln \left (x \right ) b n -{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{3}+3 \tan \left (a +b \ln \left (c \,x^{n}\right )\right )}{3 b n}\) | \(44\) |
derivativedivides | \(\frac {\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{3}}{3}-\tan \left (a +b \ln \left (c \,x^{n}\right )\right )+\arctan \left (\tan \left (a +b \ln \left (c \,x^{n}\right )\right )\right )}{n b}\) | \(49\) |
default | \(\frac {\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{3}}{3}-\tan \left (a +b \ln \left (c \,x^{n}\right )\right )+\arctan \left (\tan \left (a +b \ln \left (c \,x^{n}\right )\right )\right )}{n b}\) | \(49\) |
risch | \(\ln \left (x \right )-\frac {4 i \left (3 c^{4 i b} \left (x^{n}\right )^{4 i b} {\mathrm e}^{-2 b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{2 b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-2 b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{4 i a}+3 \left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 i a}+2\right )}{3 b n {\left (\left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 i a}+1\right )}^{3}}\) | \(335\) |
Leaf count of result is larger than twice the leaf count of optimal. 140 vs. \(2 (43) = 86\).
Time = 0.25 (sec) , antiderivative size = 140, normalized size of antiderivative = 3.11 \[ \int \frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {3 \, b n \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right )^{2} \log \left (x\right ) + 6 \, b n \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) \log \left (x\right ) + 3 \, b n \log \left (x\right ) - 2 \, {\left (2 \, \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + 1\right )} \sin \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right )}{3 \, {\left (b n \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right )^{2} + 2 \, b n \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + b n\right )}} \]
1/3*(3*b*n*cos(2*b*n*log(x) + 2*b*log(c) + 2*a)^2*log(x) + 6*b*n*cos(2*b*n *log(x) + 2*b*log(c) + 2*a)*log(x) + 3*b*n*log(x) - 2*(2*cos(2*b*n*log(x) + 2*b*log(c) + 2*a) + 1)*sin(2*b*n*log(x) + 2*b*log(c) + 2*a))/(b*n*cos(2* b*n*log(x) + 2*b*log(c) + 2*a)^2 + 2*b*n*cos(2*b*n*log(x) + 2*b*log(c) + 2 *a) + b*n)
Time = 1.65 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.44 \[ \int \frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\begin {cases} \log {\left (x \right )} \tan ^{4}{\left (a \right )} & \text {for}\: b = 0 \wedge \left (b = 0 \vee n = 0\right ) \\\log {\left (x \right )} \tan ^{4}{\left (a + b \log {\left (c \right )} \right )} & \text {for}\: n = 0 \\\frac {\log {\left (c x^{n} \right )}}{n} + \frac {\tan ^{3}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{3 b n} - \frac {\tan {\left (a + b \log {\left (c x^{n} \right )} \right )}}{b n} & \text {otherwise} \end {cases} \]
Piecewise((log(x)*tan(a)**4, Eq(b, 0) & (Eq(b, 0) | Eq(n, 0))), (log(x)*ta n(a + b*log(c))**4, Eq(n, 0)), (log(c*x**n)/n + tan(a + b*log(c*x**n))**3/ (3*b*n) - tan(a + b*log(c*x**n))/(b*n), True))
Leaf count of result is larger than twice the leaf count of optimal. 2171 vs. \(2 (43) = 86\).
Time = 0.27 (sec) , antiderivative size = 2171, normalized size of antiderivative = 48.24 \[ \int \frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\text {Too large to display} \]
1/3*(3*(b*cos(6*b*log(c))^2 + b*sin(6*b*log(c))^2)*n*cos(6*b*log(x^n) + 6* a)^2*log(x) + 27*(b*cos(4*b*log(c))^2 + b*sin(4*b*log(c))^2)*n*cos(4*b*log (x^n) + 4*a)^2*log(x) + 27*(b*cos(2*b*log(c))^2 + b*sin(2*b*log(c))^2)*n*c os(2*b*log(x^n) + 2*a)^2*log(x) + 3*(b*cos(6*b*log(c))^2 + b*sin(6*b*log(c ))^2)*n*log(x)*sin(6*b*log(x^n) + 6*a)^2 + 27*(b*cos(4*b*log(c))^2 + b*sin (4*b*log(c))^2)*n*log(x)*sin(4*b*log(x^n) + 4*a)^2 + 27*(b*cos(2*b*log(c)) ^2 + b*sin(2*b*log(c))^2)*n*log(x)*sin(2*b*log(x^n) + 2*a)^2 + 3*b*n*log(x ) + 2*(3*b*n*cos(6*b*log(c))*log(x) + 3*(3*(b*cos(6*b*log(c))*cos(4*b*log( c)) + b*sin(6*b*log(c))*sin(4*b*log(c)))*n*log(x) - 2*cos(4*b*log(c))*sin( 6*b*log(c)) + 2*cos(6*b*log(c))*sin(4*b*log(c)))*cos(4*b*log(x^n) + 4*a) + 3*(3*(b*cos(6*b*log(c))*cos(2*b*log(c)) + b*sin(6*b*log(c))*sin(2*b*log(c )))*n*log(x) - 2*cos(2*b*log(c))*sin(6*b*log(c)) + 2*cos(6*b*log(c))*sin(2 *b*log(c)))*cos(2*b*log(x^n) + 2*a) + 3*(3*(b*cos(4*b*log(c))*sin(6*b*log( c)) - b*cos(6*b*log(c))*sin(4*b*log(c)))*n*log(x) + 2*cos(6*b*log(c))*cos( 4*b*log(c)) + 2*sin(6*b*log(c))*sin(4*b*log(c)))*sin(4*b*log(x^n) + 4*a) + 3*(3*(b*cos(2*b*log(c))*sin(6*b*log(c)) - b*cos(6*b*log(c))*sin(2*b*log(c )))*n*log(x) + 2*cos(6*b*log(c))*cos(2*b*log(c)) + 2*sin(6*b*log(c))*sin(2 *b*log(c)))*sin(2*b*log(x^n) + 2*a) - 4*sin(6*b*log(c)))*cos(6*b*log(x^n) + 6*a) + 6*(3*b*n*cos(4*b*log(c))*log(x) + 9*(b*cos(4*b*log(c))*cos(2*b*lo g(c)) + b*sin(4*b*log(c))*sin(2*b*log(c)))*n*cos(2*b*log(x^n) + 2*a)*lo...
Timed out. \[ \int \frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\text {Timed out} \]
Time = 37.03 (sec) , antiderivative size = 183, normalized size of antiderivative = 4.07 \[ \int \frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\ln \left (x\right )-\frac {\frac {4{}\mathrm {i}}{3\,b\,n}+\frac {{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}\,4{}\mathrm {i}}{3\,b\,n}}{3\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+3\,{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}+{\mathrm {e}}^{a\,6{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,6{}\mathrm {i}}+1}-\frac {4{}\mathrm {i}}{3\,b\,n\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+1\right )}-\frac {{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}\,4{}\mathrm {i}}{3\,b\,n\,\left (2\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}+1\right )} \]
log(x) - (4i/(3*b*n) + (exp(a*4i)*(c*x^n)^(b*4i)*4i)/(3*b*n))/(3*exp(a*2i) *(c*x^n)^(b*2i) + 3*exp(a*4i)*(c*x^n)^(b*4i) + exp(a*6i)*(c*x^n)^(b*6i) + 1) - 4i/(3*b*n*(exp(a*2i)*(c*x^n)^(b*2i) + 1)) - (exp(a*2i)*(c*x^n)^(b*2i) *4i)/(3*b*n*(2*exp(a*2i)*(c*x^n)^(b*2i) + exp(a*4i)*(c*x^n)^(b*4i) + 1))